package com.yhy.wxzn.wcs.device.netty.bean;

import com.yhy.wxzn.wcs.device.netty.enumerate.CommandType;
import com.yhy.wxzn.wcs.device.netty.enumerate.DataType;
import com.yhy.wxzn.wcs.device.netty.enumerate.FnCode;
import io.netty.buffer.ByteBuf;

public class SiemensMessage {
    private CommandType type;
    private FnCode fnCode;
    private DataType dataType;
    private int dataLength;
    private boolean isByte;
    private int dataAddress;
    private int dbBlockNo;
    private ByteBuf dataValue;
    private String message;
    private boolean success;

    public SiemensMessage() {
    }

    public CommandType getType() {
        return this.type;
    }

    public FnCode getFnCode() {
        return this.fnCode;
    }

    public DataType getDataType() {
        return this.dataType;
    }

    public int getDataLength() {
        return this.dataLength;
    }

    public boolean isByte() {
        return this.isByte;
    }

    public int getDataAddress() {
        return this.dataAddress;
    }

    public int getDbBlockNo() {
        return this.dbBlockNo;
    }

    public ByteBuf getDataValue() {
        return this.dataValue;
    }

    public String getMessage() {
        return this.message;
    }

    public boolean isSuccess() {
        return this.success;
    }

    public void setType(CommandType type) {
        this.type = type;
    }

    public void setFnCode(FnCode fnCode) {
        this.fnCode = fnCode;
    }

    public void setDataType(DataType dataType) {
        this.dataType = dataType;
    }

    public void setDataLength(int dataLength) {
        this.dataLength = dataLength;
    }

    public void setByte(boolean isByte) {
        this.isByte = isByte;
    }

    public void setDataAddress(int dataAddress) {
        this.dataAddress = dataAddress;
    }

    public void setDbBlockNo(int dbBlockNo) {
        this.dbBlockNo = dbBlockNo;
    }

    public void setDataValue(ByteBuf dataValue) {
        this.dataValue = dataValue;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String toString() {
        return "SiemensMessage(type=" + this.getType() + ", fnCode=" + this.getFnCode() + ", dataType=" + this.getDataType() + ", dataLength=" + this.getDataLength() + ", isByte=" + this.isByte() + ", dataAddress=" + this.getDataAddress() + ", dbBlockNo=" + this.getDbBlockNo() + ", dataValue=" + this.getDataValue() + ", message=" + this.getMessage() + ", success=" + this.isSuccess() + ")";
    }
}
